package homework.server.terminal.impl;

import homework.server.terminal.Command;
import homework.server.terminal.Terminal;

public class SetVariableCommand implements Command {
    @Override
    public int execute(String[] args, Terminal terminal) throws Exception {
        if(args == null || args.length < 2)
            throw new IllegalArgumentException("命令接收两个参数");
        terminal.setVariable(args[0], args[1]);
        return 0;
    }
}
